<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var str = 'adafmmpasjwnmslulsbpocnm'
        var reg = /(mmp)|(nmsl)|(sb)|(cnm)/ig
        str1 = str.replace(reg,function(s){
            console.log(s)
            var resl = ''
            for(var i=0; i<s.length;i++){
                resl += '*'
            }
            return resl
        })
        console.log(str1)
    </script>
</body>
</html>